import Router from 'koa-router';
const router = new Router();
import proxyService from '../../common/proxyService';
import {
  saveAgentLoginBySession,
  saveLoginAgent,
  agentLoginOutBySession,
  queryCompanyStatsAgent,
} from '../../api/agent';
// 获取
router.post('/saveAgentLoginBySession', async ctx => {
  const response = await proxyService.postProxy(ctx, saveAgentLoginBySession);
  return (ctx.body = response);
});

router.post('/saveLoginAgent', async ctx => {
  const response = await proxyService.postProxy(ctx, saveLoginAgent);
  return (ctx.body = response);
});

router.get('/queryCompanyStats', async ctx => {
  const response = await proxyService.postProxy(ctx, queryCompanyStatsAgent);
  return (ctx.body = response);
});

router.post('/agentLoginOutBySession', async ctx => {
  const response = await proxyService.postProxy(ctx, agentLoginOutBySession);
  return (ctx.body = response);
});

module.exports = router;
